import {IMock} from './i-mock';
import {MockConfigItem} from '../../entity/mock-config-item';

export class EnumMock implements IMock {
    getBaseTypeMockConfigDisplay(mockConfigItem: MockConfigItem): string {
        if (mockConfigItem.mockType === 1) {
            // 随机
            return 'random(enumValues)';
        }
        return '\"' + mockConfigItem.value + '\"';
    }

    onSave(mockConfigItem: MockConfigItem): boolean {
        return true;
    }
}
